#ifndef CUSTOM_SSR_PASS_INCLUDED
#define CUSTOM_SSR_PASS_INCLUDED

#include "../ShaderLib/Surface.hlsl"
#include "../ShaderLib/Shadows.hlsl"
#include "../ShaderLib/Light.hlsl"
#include "../ShaderLib/BRDF.hlsl"
#include "../ShaderLib/GI.hlsl"
#include "../ShaderLib/Lighting.hlsl"
#include "../ShaderLib/GBuffers.hlsl"

float4 _ProjectionParams;
float4x4 MatrixP;
float4x4 invMatrixVP;
float4x4 MatrixV;

struct Varyings {
	float4 positionCS : SV_POSITION;
	float2 screenUV : VAR_SCREEN_UV;
};

Varyings DefaultPassVertex(uint vertexID : SV_VertexID) {
	Varyings output;
	output.positionCS = float4(
		vertexID <= 1 ? -1.0 : 3.0,
		vertexID == 1 ? 3.0 : -1.0,
		0.0, 1.0);
	output.screenUV = float2(
		vertexID <= 1 ? 0.0 : 2.0,
		vertexID == 1 ? 2.0 : 0.0);
	if (_ProjectionParams.x < 0.0) {
		output.screenUV.y = 1.0 - output.screenUV.y;
	}
	return output;
}

struct FragmentOutput {
	float4 color : COLOR;
};

float3 Linear2DSSR() {

}

FragmentOutput SSRPassFragment(Varyings input) {
	//Informations from GBuffers
	float3 worldPos = GetPosition(input.screenUV);
	float3 worldNormal = GetNormal(input.screenUV);
	float3 rayCamera = normalize(_WorldSpaceCameraPos - surface.position);
	float3 rayReflection = reflect(rayCamera, worldNormal);

	//Choose SSR Algorithm
	FragmentOutput output;

	output.color = 

}
#endif